package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ByMunicipalityTaskMapper;
import com.ruoyi.system.domain.ByMunicipalityTask;
import com.ruoyi.system.service.IByMunicipalityTaskService;

/**
 * 自治区任务Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-12
 */
@Service
public class ByMunicipalityTaskServiceImpl implements IByMunicipalityTaskService 
{
    @Autowired
    private ByMunicipalityTaskMapper byMunicipalityTaskMapper;

    /**
     * 查询自治区任务
     * 
     * @param id 自治区任务主键
     * @return 自治区任务
     */
    @Override
    public ByMunicipalityTask selectByMunicipalityTaskById(Long id)
    {
        return byMunicipalityTaskMapper.selectByMunicipalityTaskById(id);
    }

    /**
     * 查询自治区任务列表
     * 
     * @param byMunicipalityTask 自治区任务
     * @return 自治区任务
     */
    @Override
    public List<ByMunicipalityTask> selectByMunicipalityTaskList(ByMunicipalityTask byMunicipalityTask)
    {
        return byMunicipalityTaskMapper.selectByMunicipalityTaskList(byMunicipalityTask);
    }

    /**
     * 新增自治区任务
     * 
     * @param byMunicipalityTask 自治区任务
     * @return 结果
     */
    @Override
    public int insertByMunicipalityTask(ByMunicipalityTask byMunicipalityTask)
    {
        byMunicipalityTask.setCreateTime(DateUtils.getNowDate());
        return byMunicipalityTaskMapper.insertByMunicipalityTask(byMunicipalityTask);
    }

    /**
     * 修改自治区任务
     * 
     * @param byMunicipalityTask 自治区任务
     * @return 结果
     */
    @Override
    public int updateByMunicipalityTask(ByMunicipalityTask byMunicipalityTask)
    {
        return byMunicipalityTaskMapper.updateByMunicipalityTask(byMunicipalityTask);
    }

    /**
     * 批量删除自治区任务
     * 
     * @param ids 需要删除的自治区任务主键
     * @return 结果
     */
    @Override
    public int deleteByMunicipalityTaskByIds(Long[] ids)
    {
        return byMunicipalityTaskMapper.deleteByMunicipalityTaskByIds(ids);
    }

    /**
     * 删除自治区任务信息
     * 
     * @param id 自治区任务主键
     * @return 结果
     */
    @Override
    public int deleteByMunicipalityTaskById(Long id)
    {
        return byMunicipalityTaskMapper.deleteByMunicipalityTaskById(id);
    }
}
